﻿@{
    ViewBag.Title = "AutoScheduleClass";
    Layout = "~/Views/Shared/_ScheduleClass_View.cshtml";
}

@section headerPartial {
    <div class="modal fade" id="myModalUserInfo" tabindex="-1" role="dialog" aria-hidden="false" data-backdrop="static" data-keyboard="false">
        <div class="modal-dialog">
            <div class="modal-content" id="modal1">
                <div class="modal-header">
                    <button id="btnClose" type="button" class="close" data-dismiss="modal" style="display: none;">
                        ×
                   
                    </button>
                    <div class="modal-title">
                        <b>完善信息，免费获得排课秘籍</b>
                    </div>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal" role="form">
                        <div class="form-group">
                            <label for="list_school_name" class="col-sm-2 control-label">*学校全称</label>
                            <div class="col-sm-9" style="height: 55px;">
                                <div>
                                    <input id="list_school_name" type="text" class="form-control" placeholder="学校全称" aria-describedby="basic-addon1" maxlength="20"
                                        style="display: inline;">
                                </div>
                                <span id="inputError1" for="list_school_name" class="label label-danger" style="visibility: hidden">学校全称必填</span>
                            </div>
                            <br>
                            <br>
                            <label for="list_area" class="col-sm-2 control-label">*所在地区</label>
                            <div class="col-sm-9" style="height: 55px;">
                                <link rel="stylesheet" href="/Static/Template/css/city-picker.css">
                                <script src="/Static/Template/js/city-picker.data.js"></script>
                                <script src="/Static/Template/js/city-picker.js"></script>
                                <div data-toggle="city-picker" class="form-control city-picker-input">
                                    <input id="list_area" readonly="" type="text">
                                </div>
                                <span class="city-picker-span" style="width: 1440px; height: 34px; line-height: 33px;">
                                    <span class="placeholder">请选择地区</span>
                                    <span class="title1" style="display: none;"></span>
                                    <div class="arrow"></div>
                                </span>
                                <div class="city-picker-dropdown" style="left: 0px; top: 100%; width: 1440px;">
                                    <div class="city-select-wrap">
                                        <div class="city-select-tab">
                                            <a class="active" data-count="province">省份</a>
                                            <a data-count="city">城市</a>
                                            <a data-count="district">区县</a>
                                        </div>
                                        <div class="city-select-content">
                                            <div class="city-select province" data-count="province" style="display: block;">
                                                <dl class="clearfix">
                                                    <dt>A-G</dt>
                                                    <dd>
                                                        <a title1="安徽省" data-code="340000" class="">安徽省</a>
                                                        <a title1="北京市" data-code="110000" class="">北京市</a>
                                                        <a title1="重庆市" data-code="500000" class="">重庆市</a>
                                                        <a title1="福建省" data-code="350000" class="">福建省</a>
                                                        <a title1="甘肃省" data-code="620000" class="">甘肃省</a>
                                                        <a title1="广东省" data-code="440000" class="">广东省</a>
                                                        <a title1="广西壮族自治区" data-code="450000" class="">广西壮族自治区</a>
                                                        <a title1="贵州省" data-code="520000" class="">贵州省</a>
                                                    </dd>
                                                </dl>
                                                <dl class="clearfix">
                                                    <dt>H-K</dt>
                                                    <dd>
                                                        <a title1="海南省" data-code="460000" class="">海南省</a>
                                                        <a title1="河北省" data-code="130000" class="">河北省</a>
                                                        <a title1="黑龙江省" data-code="230000" class="">黑龙江省</a>
                                                        <a title1="河南省" data-code="410000" class="">河南省</a>
                                                        <a title1="湖北省" data-code="420000" class="">湖北省</a>
                                                        <a title1="湖南省" data-code="430000" class="">湖南省</a>
                                                        <a title1="江苏省" data-code="320000" class="">江苏省</a>
                                                        <a title1="江西省" data-code="360000" class="">江西省</a>
                                                        <a title1="吉林省" data-code="220000" class="">吉林省</a>
                                                    </dd>
                                                </dl>
                                                <dl class="clearfix">
                                                    <dt>L-S</dt>
                                                    <dd>
                                                        <a title1="辽宁省" data-code="210000" class="">辽宁省</a>
                                                        <a title1="内蒙古自治区" data-code="150000" class="">内蒙古自治区</a>
                                                        <a title1="宁夏回族自治区" data-code="640000" class="">宁夏回族自治区</a>
                                                        <a title1="青海省" data-code="630000" class="">青海省</a>
                                                        <a title1="山东省" data-code="370000" class="">山东省</a>
                                                        <a title1="上海市" data-code="310000" class="">上海市</a>
                                                        <a title1="山西省" data-code="140000" class="">山西省</a>
                                                        <a title1="陕西省" data-code="610000" class="">陕西省</a>
                                                        <a title1="四川省" data-code="510000" class="">四川省</a>
                                                    </dd>
                                                </dl>
                                                <dl class="clearfix">
                                                    <dt>T-Z</dt>
                                                    <dd>
                                                        <a title1="天津市" data-code="120000" class="">天津市</a>
                                                        <a title1="新疆维吾尔自治区" data-code="650000" class="">新疆维吾尔自治区</a>
                                                        <a title1="西藏自治区" data-code="540000" class="">西藏自治区</a>
                                                        <a title1="云南省" data-code="530000" class="">云南省</a>
                                                        <a title1="浙江省" data-code="330000" class="">浙江省</a>
                                                    </dd>
                                                </dl>
                                            </div>
                                            <div class="city-select city" data-count="city" style="display: none;">
                                                <dl class="clearfix">
                                                    <dd></dd>
                                                </dl>
                                            </div>
                                            <div class="city-select district" data-count="district" style="display: none;">
                                                <dl class="clearfix">
                                                    <dd></dd>
                                                </dl>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <span id="inputError2" for="list_area" class="label label-danger" style="visibility: hidden">所在地区必填(省份、城市、区县)</span>
                            </div>
                            <br>
                            <br>
                            <label for="schoolType" class="col-sm-2 control-label">*学校类型</label>
                            <div class="col-sm-9" style="height: 55px;">
                                <div>
                                    <select id="schoolType" class="form-control">
                                        <option value="-1" selected="selected">选择学校类型</option>
                                        <option value="0">小学</option>
                                        <option value="1">初中</option>
                                        <option value="2">高中</option>
                                        <option value="3">完全中学</option>
                                        <option value="4">大学</option>
                                        <option value="5">培训机构</option>
                                        <option value="6">竞品公司</option>
                                        <option value="7">其他</option>
                                    </select>
                                </div>
                                <span id="inputError6" for="schoolType" class="label label-danger" style="visibility: hidden">学校类型必选</span>
                            </div>
                            <br>
                            <br>
                            <hr style="width: 100%; height: 1px; float: left;">
                            <div>
                                <label for="list_job" class="col-sm-2 control-label">*您的职务</label>
                                <div class="col-sm-9" style="height: 55px; width: 165px;">
                                    <div>
                                        <select id="list_job" class="form-control">
                                            <option value="-1" selected="selected">选择您的职务</option>
                                            <option value="0">教务处负责人</option>
                                            <option value="1">信息负责人</option>
                                            <option value="2">年级主任</option>
                                            <option value="3">教学组长</option>
                                            <option value="4">理科教师</option>
                                            <option value="5">文科教师</option>
                                            <option value="6">教学副校长</option>
                                        </select>
                                    </div>
                                    <span id="inputError7" for="list_job" class="label label-danger" style="visibility: hidden">职务必选</span>
                                </div>
                                <label for="list_age" class="col-sm-2 control-label">*您的年龄</label>
                                <div class="col-sm-9" style="height: 55px; width: 165px;">
                                    <div>
                                        <select id="list_age" class="form-control">
                                            <option value="-1" selected="selected">选择您的年龄</option>
                                            <option value="0">20岁-25岁</option>
                                            <option value="1">25岁-30岁</option>
                                            <option value="2">30岁-35岁</option>
                                            <option value="3">35岁-40岁</option>
                                            <option value="4">40岁-45岁</option>
                                            <option value="5">45岁-50岁</option>
                                            <option value="6">50岁以上</option>
                                        </select>
                                    </div>
                                    <span id="inputError8" for="list_age" class="label label-danger" style="visibility: hidden">年龄必选</span>
                                </div>
                            </div>
                            <br>
                            <br>
                            <label for="list_phone" class="col-sm-2 control-label">*联系电话</label>
                            <div class="col-sm-9" style="height: 55px;">
                                <div>
                                    <input id="list_phone" type="text" class="form-control" placeholder="联系电话" aria-describedby="basic-addon1" maxlength="11"
                                        style="display: inline;">
                                </div>
                                <span id="inputError3" for="list_phone" class="label label-danger" style="visibility: hidden">无效联系电话</span>
                            </div>
                            <br>
                            <br>
                            <label for="list_qq" class="col-sm-2 control-label">联系QQ</label>
                            <div class="col-sm-9" style="height: 55px;">
                                <div>
                                    <input id="list_qq" type="text" class="form-control" placeholder="" aria-describedby="basic-addon1" maxlength="20">
                                </div>
                                <span id="inputError4" for="list_qq" class="label label-danger" style="visibility: hidden">无效QQ号</span>
                            </div>
                            <br>
                            <br>
                            <label for="list_mail" class="col-sm-2 control-label">联系邮箱</label>
                            <div class="col-sm-9" style="height: 55px;">
                                <div>
                                    <input id="list_mail" type="text" class="form-control" placeholder="" aria-describedby="basic-addon1" maxlength="100">
                                </div>
                                <span id="inputError5" for="list_mail" class="label label-danger" style="visibility: hidden">无效联系邮箱</span>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <!--<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>-->
                    <button id="btn_save_user_Info" type="button" class="btn btn-primary" onclick="userInfoEditor.inputUserInfo()">确定</button>
                </div>
            </div>
        </div>
        <input type="hidden" id="oldProvince">
        <input type="hidden" id="oldCity">
        <input type="hidden" id="oldDistrict">
    </div>
    <script>
        var userInfoEditor = new UserInfoEditor();
        $('#myModalUserInfo').on('show.bs.modal', function (e) {

            $(this).find('.modal-dialog').css({
                'margin-top': function () {
                    $("#inputError1").css({ 'visibility': 'hidden' });
                    $("#inputError2").css({ 'visibility': 'hidden' });
                    $("#inputError3").css({ 'visibility': 'hidden' });
                    $("#inputError4").css({ 'visibility': 'hidden' });
                    $("#inputError5").css({ 'visibility': 'hidden' });
                    $("#inputError6").css({ 'visibility': 'hidden' });
                    $("#inputError7").css({ 'visibility': 'hidden' });
                    $("#inputError8").css({ 'visibility': 'hidden' });
                    jQuery.ajax({
                        type: "GET",
                        url: "/m/userInfo/getUserInfo",
                        cache: false,
                        success: function (ret) {
                            var info = JSON.parse(ret);
                            $(".city-picker-span").css("width", "100%");
                            $(".city-picker-dropdown").css("width", "100%");
                            if (info.area != null && info.area != "" && info.area != undefined) {
                                $("#list_age").val(info.area);
                                var areaArray = info.area.split("-");

                                if (areaArray.length >= 3) {
                                    $("span .placeholder").css("display", "none");
                                    $("span .title1").css("display", "");
                                    $("span .title1").empty();
                                    $("#oldProvince").val(areaArray[0]);
                                    $("#oldCity").val(areaArray[1]);
                                    $("#oldDistrict").val(areaArray[2]);
                                    $("span .title1").append("<span class='select-item' data-count='province'>" + areaArray[0] + "</span>-");
                                    $("span .title1").append("<span class='select-item' data-count='city'>" + areaArray[1] + "</span>-");
                                    $("span .title1").append("<span class='select-item' data-count='district'>" + areaArray[2] + "</span>");
                                } else if (areaArray.length >= 2) {
                                    $("span .title1").empty();
                                    $("span .placeholder").css("display", "none");
                                    $("#oldProvince").val(areaArray[0]);
                                    $("#oldCity").val(areaArray[1]);
                                    $("span .title1").append("<span class='select-item' data-count='province'>" + areaArray[0] + "</span>-");
                                    $("span .title1").append("<span class='select-item' data-count='city'>" + areaArray[1] + "</span>");
                                } else if (areaArray.length >= 1) {
                                    $("span .title1").empty();
                                    $("#oldProvince").val(areaArray[0]);
                                    $("span .placeholder").css("display", "none");
                                    $("span .title1").append("<span class='select-item' data-count='province'>" + areaArray[0] + "</span>");
                                }
                                $("#btnClose").removeAttr("style");
                            }
                            if (info.schoolName != null && info.schoolName != "" && info.schoolName != undefined) {
                                $("#list_school_name").val(info.schoolName);
                            }
                            if (info.phone != null && info.phone != "" && info.phone != undefined) {
                                $("#list_phone").val(info.phone);
                            }
                            if (info.qqNumber != null && info.qqNumber != "" && info.qqNumber != undefined) {
                                $("#list_qq").val(info.qqNumber);
                            }
                            if (info.userEmail != null && info.userEmail != "" && info.userEmail != undefined) {
                                $("#list_mail").val(info.userEmail);
                            }
                            if (info.ageArrange != null && info.ageArrange != undefined && info.ageArrange.toString() != "") {
                                $("#list_age").val(info.ageArrange);
                            }
                            if (info.jobType != null && info.jobType != undefined && info.jobType.toString() != "") {
                                $("#list_job").val(info.jobType);
                            }
                            if (info.schoolType != null && info.schoolType != undefined && info.schoolType.toString() != "") {
                                $("#schoolType").val(info.schoolType);
                            }
                        }
                    });
                    $("#list_school_name").focus(function () {
                        $("#inputError1").css({ 'visibility': 'hidden' });
                    });
                    $("#list_area").focus(function () {
                        $("#inputError2").css({ 'visibility': 'hidden' });
                    });
                    $("#list_phone").focus(function () {
                        $("#inputError3").css({ 'visibility': 'hidden' });
                    });
                    $("#list_qq").focus(function () {
                        $("#inputError4").css({ 'visibility': 'hidden' });
                    });
                    $("#list_mail").focus(function () {
                        $("#inputError5").css({ 'visibility': 'hidden' });
                    });
                    $("#schoolType").change(function () {
                        $("#inputError6").css({ 'visibility': 'hidden' });
                    });
                    $("#list_job").change(function () {
                        $("#inputError7").css({ 'visibility': 'hidden' });
                    });
                    $("#list_age").change(function () {
                        $("#inputError8").css({ 'visibility': 'hidden' });
                    });
                    var modalHeight = 580; // $('#myModal').find('.modal-dialog').height();
                    return ($(window).height() / 2 - (modalHeight / 2));
                }
            });
        });
    </script>

    <script>
        var _hmt = _hmt || [];
        (function () {
            var hm = document.createElement("script");
            hm.src = "//hm.baidu.com/hm.js?7c66c07d4e8cc54deba8d7f967efe75b";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
        $(document).ready(function () {
            updateSchoolView();
        });
        function loadInputTable() {
            if (userInfoEditor) {
                userInfoEditor.showUserInfoInput();
            }
        }

        function updateSchoolView() {
            var schoolLabel = $("#label_school_name");
            jQuery.ajax({
                type: "GET",
                url: "/m/userInfo/getSchoolName",
                cache: false,
                success: function (ret) {
                    var userInfoButton = $("#btn_add_userInfo");
                    userInfoButton.css({ 'visibility': 'visible' });
                    if (ret.split(",")[0] == "") {
                        //从未填写过学校信息
                        userInfoButton.text("添加");
                        $("#btn_add_task").attr('disabled', true);
                        $("#btn_add_task_first").attr('disabled', true);
                        schoolLabel.text("学校: 未填写");
                        loadInputTable();
                    } else {
                        userInfoButton.text("修改");
                        $("#btn_add_task").attr('disabled', false);
                        $("#btn_add_task_first").attr('disabled', false);
                        schoolLabel.text("学校: " + ret.split(",")[0]);
                        if (ret.split(",")[1] == "") {
                            loadInputTable();
                        }
                    }
                    schoolLabel.css({ 'visibility': 'visible' });
                }
            });
        }
    </script>
}

<div id="divbody" style="min-height: 495px;">
    <div class="container" id="divcon">
        <link href="/Static/Template/css/btnDiv.css" rel="stylesheet" type="text/css">
        <link href="/Static/Template/css/start.css" rel="stylesheet" type="text/css">
        <link href="/Static/Template/css/step-box.css" rel="stylesheet">
        <div id="divBody">
            <style>
                a.view-course-plan {
                    padding-left: 25px;
                    background-repeat: no-repeat;
                    margin-left: 10px;
                    text-decoration: none;
                    padding-bottom: 5px;
                }



                li.pos {
                    margin-left: 15px;
                }

                .list-inline a {
                    text-decoration: none;
                    padding-left: 25px;
                    padding-bottom: 5px;
                }
            </style>
            <div class="row" style="margin-top: 20px;">
                <div class="col-md-8">
                    <ul class="list-inline">
                        <li>
                            <a href="javascript:void()" id="baseInfo" onclick="goUrl(&#39;/m/baseInfo/index?taskId=2640188197994496&#39;)" class="task-baseInfo">基础信息</a>
                        </li>
                        <li class="pos">
                            <a href="javascript:void()" id="rule" onclick="goUrl(&#39;/m/rule/unScheduleRule?taskId=2640188197994496&#39;)" class="task-rule">规则条件</a>
                        </li>
                        <li class="pos">
                            <a href="javascript:void()" id="preAssignment" onclick="goUrl(&#39;/m/courseplan/preschedule?taskId=2640188197994496&#39;)"
                                class="task-preAssignment">预排</a>
                        </li>
                        <li class="pos">
                            <a href="javascript:void()" id="auto" onclick="goUrl(&#39;/m/courseplan/start?taskId=2640188197994496&#39;)" class="task-auto active task-auto-active">自动排课</a>
                        </li>
                        <li class="pos" show-by-courseplan="1" style="display: none;">
                            <a id="adjust" class="task-adjust" href="http://paike.yunxiao.com/m/adjustTeaCoursePlan/teaTimeTable?taskId=2640188197994496#c">调课</a>
                        </li>
                        <li class="pos" show-by-courseplan="1" style="display: none;">
                            <a href="http://paike.yunxiao.com/m/courseplan/class?taskId=2640188197994496" id="task-coursePlan" class="task-coursePlan">查看课表</a>
                        </li>

                    </ul>
                </div>

                <div class="col-md-2 col-md-offset-2">
                    <div class="dropdown" style="float: right;">
                        <button id="btnQuestions" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="btn btn-default dropdown-toggle">
                            排课遇到难题
                               
                            <span class="caret"></span>
                        </button>
                        <ul id="questions-list" class="dropdown-menu dropdown-menu-right" aria-labelledby="btnQuestions">
                            <li>
                                <a href="http://bbs.yunxiao.com/forum.php?mod=viewthread&amp;tid=2928&amp;extra=page%3D1"
                                    target="_blank">已完成自动排课，但存在冲突？</a>
                            </li>
                            <li>
                                <a href="http://bbs.yunxiao.com/forum.php?mod=viewthread&amp;tid=2928&amp;extra=page%3D1"
                                    target="_blank">找不到某个班级的初始解，请减少约束条件？</a>
                            </li>
                            <li>
                                <a href="http://bbs.yunxiao.com/forum.php?mod=viewthread&amp;tid=2928&amp;extra=page%3D1"
                                    target="_blank">在课时设置时总课时数是足够的，但点击“自动排课”后显示某班级实际总课时不够?</a>
                            </li>
                            <li>
                                <a href="http://bbs.yunxiao.com/forum.php?mod=viewthread&amp;tid=2928&amp;extra=page%3D1"
                                    target="_blank">“偏好设置”有什么帮助？</a>
                            </li>
                            <li>
                                <a href="http://bbs.yunxiao.com/forum.php?mod=viewthread&amp;tid=2928&amp;extra=page%3D1"
                                    target="_blank">点击“开始自动排课”网页没有反应？</a>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>

            <script src="/Static/Template/js/course-plan.js" charset="utf-8"></script>
            <script>
                var coursePlanService = new CoursePlanService();
                var hasCoursePlan = 0;
                $(function () {
                    initButton();
                })
                function initButton() {
                    coursePlanService.hasCoursePlan(taskId, function (has) {
                        hasCoursePlan = has;
                        $("li[show-by-courseplan='1']").hide();
                        if (has == "1") {
                            $("li[show-by-courseplan='1']").show();
                        }
                    })
                }
                </script>

            <script>
                function fillQuestion(list) {
                    var html = new Array();
                    for (var i = 0; i < list.length; i++) {
                        html.push("<li><a href='" + list[i].text + "' target='_blank'>" + list[i].title + "</a></li>");
                    }
                    $("#questions-list").html(html.join(""));
                }

                function getContentList(sign) {
                    jQuery.ajax({
                        url: "/m/content?sign=" + sign,
                        type: "GET",
                        success: function (ret) {
                            if (ret) {
                                fillQuestion(ret);
                            } else {
                                $("#questions-list").html("<li><a href='http://bbs.yunxiao.com/forum.php?mod=forumdisplay&fid=36'" +
                                    " target='_blank'>暂时没有内容，前往论坛</a></li>");
                            }
                        }
                    })
                }
                </script>
            <div class="row" style="margin-top: 20px">
                <div class="col-md-8">
                    剩下的工作交给云校吧~
                   
                </div>
            </div>
            <div style="margin-top: 10px; border-top: 1px solid #0599f7"></div>
            <!--弹出冲突列表-->
            <style type="text/css">
                .conflictInfo {
                    border-collapse: collapse;
                    border: none;
                    width: 100%;
                }

                    .conflictInfo td {
                        border: solid #c0c0c0 1px;
                        vertical-align: middle;
                        padding-left: 5px;
                        padding-right: 5px;
                        padding-top: 5px;
                        padding-bottom: 5px;
                        text-align: left;
                    }

                    .conflictInfo th {
                        border: solid #c0c0c0 1px;
                        vertical-align: middle;
                        min-width: 55px;
                        text-align: center;
                        background-color: #DFDFDF;
                        height: 30px;
                    }

                .pwait {
                    margin-left: 10px;
                    color: #ff0000;
                    display: table-cell;
                    vertical-align: middle;
                    text-align: center;
                    font-weight: bold;
                    font-size: 18px;
                    letter-spacing: 3px;
                }

                #divConflict {
                    text-align: center;
                    vertical-align: middle;
                    width: 100%;
                    height: 300px;
                    overflow: auto;
                    max-height: 300px;
                    display: table;
                }

                #ruleListModal .modal .modal-dialog {
                    width: 900px;
                }

                #ruleListModal .modal-body {
                    height: 400px;
                    overflow-y: auto;
                    overflow-x: hidden;
                    margin-bottom: 30px;
                }

                #ruleListModal table {
                    text-align: center;
                    border: 1px solid #c6c6c6;
                }

                    #ruleListModal table thead {
                        background-color: #ef755d;
                        color: #ffffff;
                    }

                /*endregion 规则列表*/
            </style>
            <div class="modal fade" id="conflictModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false">
                <div class="modal-dialog">
                    <div class="modal-content" id="modal1">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal">
                                <span aria-hidden="true">×</span>
                            </button>
                            <div class="modal-title" id="myModalLabel">
                                <b>排课规则冲突列表</b>
                            </div>
                        </div>
                        <div class="modal-body" id="divbody">
                            <div id="divConflict"></div>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-primary" onclick="checkConflict(2640188197994496);">重新检测</button>
                        </div>
                    </div>
                </div>
            </div>


            <link href="/Static/Template/css/ruleDialog.css" rel="stylesheet">
            <style>
                #ruleListTable_body td {
                    padding: 8px;
                    font-size: 14.8px;
                    text-align: left;
                }
            </style>
            <!--规则列表 Modal -->
            <div class="modal fade modal-ruleList" id="ruleListModal" tabindex="-1" role="dialog" aria-labelledby="ruleListModalLabel"
                aria-hidden="false">
                <div class="modal-dialog" style="width: 900px">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal">
                                <span aria-hidden="true">×</span>
                            </button>
                            <div class="modal-title" id="ruleListModalLabel">
                                <b>规则列表</b>
                            </div>
                            <div style="margin-top: 10px;">
                                <select id="unScheduleRuleListTypeSlt" onchange="ruleViewer.getRuleList()" class="form-control" style="margin-bottom: 10px; width: 200px;">
                                    <option value="all" selected="">所有规则</option>
                                    <option value="unschedule_grade">年级不排课</option>
                                    <option value="unschedule_class">班级不排课</option>
                                    <option value="unschedule_course">课程不排课</option>
                                    <option value="unschedule_course_grade">年级课程不排课</option>
                                    <option value="unschedule_teacher">教师不排课</option>
                                    <option value="preschedule">预排</option>
                                    <option value="importance_japq">教案平齐</option>
                                    <option value="importance_zrkfb">周任课分布</option>
                                    <option value="importance_rrkfb">日任课分布</option>
                                    <option value="importance_lsxz">连上限制</option>
                                </select>
                                <span id="ruleStatistics"></span>
                            </div>
                        </div>
                        <div class="modal-body">
                            <table class="table table-striped table-bordered">
                                <thead>
                                    <tr>
                                        <td width="130">规则</td>
                                        <td>细则</td>
                                        <td style="width: 100px">重要性</td>
                                        <td width="50">操作</td>
                                    </tr>
                                </thead>
                                <tbody id="ruleListTable_body">
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
            <script src="/Static/Template/js/rule-statistic.js" charset="UTF-8"></script>
            <script src="/Static/Template/js/rule-view.js" charset="UTF-8"></script>
            <script>
                var _hmt = _hmt || [];
                (function () {
                    var hm = document.createElement("script");
                    hm.src = "https://hm.baidu.com/hm.js?7c66c07d4e8cc54deba8d7f967efe75b";
                    var s = document.getElementsByTagName("script")[0];
                    s.parentNode.insertBefore(hm, s);
                })();
                </script>
            <script>
                var ruleViewer = new RuleViewer();
                </script>
            <script>
                var isMyTask = true
                </script>
            <script>
                ruleViewer.setTaskId('2640188197994496')
                </script>

            <script type="text/javascript">
                var unScheduleRuleType = "class";//默认不排课规则类型
                var taskId = "2640188197994496";//排课任务
                </script>
            <script type="text/javascript" src="/Static/Template/js/coursePlanConflict.js"></script>
            <div style="margin-top: 60px; text-align: center; font-size: 16px; color: #ff0000">
                请先完善基础信息再进行排课！
                   
                <a href="http://paike.yunxiao.com/m/baseInfo/index?taskId=2640188197994496">完善基础信息</a>
            </div>

            <div id="stepArea" style="height: 70px;">
                <div id="stepBox" class="text-right stepBoxFixed2" style="bottom: 57px;">
                    <button type="button" class="btn btn-primary btn-sm" id="btnNext" onclick="goUrl(&#39;/m/courseplan/preschedule?taskId=2640188197994496&#39;)">
                        上一步
                       
                    </button>
                </div>
            </div>
        </div>

        <!-- copyTaskModal -->
        <div class="modal fade" id="myModal" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog" style="margin-top: 200px">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal">
                            <span aria-hidden="true">×</span>
                        </button>
                        <div class="modal-title" id="myModalLabel">
                            <b>添加排课任务</b>
                        </div>
                    </div>
                    <div class="modal-body">

                        <form class="form-horizontal" role="form">
                            <div class="form-group">
                                <label for="txtName" class="col-sm-2 control-label">
                                    <span style="color: #ff0000">*</span>名称
                                   
                                </label>

                                <div class="col-sm-9">
                                    <input type="text" class="form-control" id="txtName">
                                </div>
                            </div>
                            <div class="form-group" style="display: none">
                                <label for="txtPeriod" class="col-sm-2 control-label">学期</label>
                                <div class="col-sm-9">
                                    <input type="text" class="form-control" id="txtPeriod">
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="modal-footer">
                        <button id="btn_cancel" type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                        <button id="btn_save" type="button" class="btn btn-primary" onclick="addTask();">保存</button>
                        <input type="hidden" value="0" id="copyId">
                        <input type="hidden" value="0" id="status">
                    </div>
                </div>
            </div>
        </div>
        <div class="modal fade" id="reschedule-settings-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"
            data-backdrop="static">
            <div class="modal-dialog" style="margin-top: 50px">
                <div class="modal-content">
                    <div class="modal-header">
                        <div class="modal-title" id="myModalLabel">
                            <b>请选择
                                   
                                <span style="color: red">不需要</span>重新排课的班级</b>
                        </div>
                    </div>
                    <div class="modal-body" id="reschedule-settings-modal-content" style="height: 450px; overflow: auto">
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal" onclick="savePartRescheduleSettings()">确定</button>
                    </div>
                </div>
            </div>
        </div>

        <script>
            var _hmt = _hmt || [];
            (function () {
                var hm = document.createElement("script");
                hm.src = "https://hm.baidu.com/hm.js?7c66c07d4e8cc54deba8d7f967efe75b";
                var s = document.getElementsByTagName("script")[0];
                s.parentNode.insertBefore(hm, s);
            })();
            </script>
        <script type="text/javascript">
            var taskId = 2640188197994496;
            var result = 0;
            var hasClassCourseTeacher = false;
            </script>

        <script>
            var isMyTask = true
            </script>
        <script src="/Static/Template/js/course-plan.js" charset="utf-8"></script>
        <script src="/Static/Template/js/base-info.js" type="text/javascript" charset="utf-8"></script>
        <script src="/Static/Template/js/rule-statistic.js" charset="UTF-8"></script>
        <script src="/Static/Template/js/rule-matching-statistic.js" charset="UTF-8"></script>
        <script src="/Static/Template/js/task.js" type="text/javascript" charset="utf-8"></script>
        <script src="/Static/Template/js/start.js" type="text/javascript" charset="utf-8"></script>
        <script src="/Static/Template/js/part-schedule.js" type="text/javascript" charset="utf-8"></script>
        <script type="text/javascript" src="/Static/Template/js/step-box.js"></script>
        <script>
            stepBox.init();
            $(function () {
                $(".dropdown-toggle").dropdown();
                getContentList("qAutoStart");
            })
            </script>
    </div>
</div>
